using imitateMacQQ.WebApi.Domain.Request.utils;
using imitateMacQQ.WebApi.Domain.utils;
using Microsoft.AspNetCore.Mvc;

namespace imitateMacQQ.WebApi.Api;

[ApiController]
[Route("api/[controller]/[action]")]
public class GetUsrHeaderController : ControllerBase
{
    public GetUsrHeaderController(IUploadService uploadService)
    {
        _uploadService = uploadService;
    }

    private readonly IUploadService _uploadService;

    [HttpGet]
    public async Task<Request<string>> GetHeaderUrl(string account)
    {
        return await _uploadService.GetHeader(account); //获取头像
    }

    [HttpGet]
    public async Task<Request<string>> GetAnyUrl(string account, string include)
    {
        return await _uploadService.Get_Url(account, include);//获取图片url include：要获取的部位
    }
}